|
In-system programming (ISP), also called In-Circuit Serial Programming (ICSP), is the ability of some programmable logic devices, microcontrollers, and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. There are several incompatible in-system programming protocols for programming microcontroller devices such as PIC microcontrollers, AVRs, and the Parallax Propeller. ICSP has been primarily implemented by Microchip Technology for programming PIC and dsPIC devices. The primary advantage of this feature is that it allows manufacturers of electronic devices to integrate programming and testing into a single production phase, and save money, rather than requiring a separate programming stage prior to assembling the system. This may allow manufacturers to program the chips in their own system's production line instead of buying preprogrammed chips from a manufacturer or distributor, making it feasible to apply code or design changes in the middle of a production run. Microcontrollers are typically soldered directly to a printed circuit board and usually do not have the circuitry or space for a large external programming cable to another computer. Typically, chips supporting ISP have internal circuitry to generate any necessary programming voltage from the system's normal supply voltage, and communicate with the programmer via a serial protocol. Most programmable logic devices use a variant of the JTAG protocol for ISP, in order to facilitate easier integration with automated testing procedures. Other devices usually use proprietary protocols or protocols defined by older standards. In systems complex enough to require moderately large glue logic, designers may implement a JTAG-controlled programming subsystem for non-JTAG devices such as flash memory and microcontrollers, allowing the entire programming and test procedure to be accomplished under the control of a single protocol. An example of devices using ISP is the AVR line of micro-controllers by Atmel such as the ATmega series. == Microchip ICSP == For most Microchip microcontrollers, ICSP programming is performed using two pins, clock (PGC) and data (PGD), while a high voltage (12 V) is present on the Vpp/MCLR pin. Low voltage programming (5 V or 3.3 V) dispenses with the high voltage, but reserves exclusive use of an I/O pin. However, for newer microcontrollers, specifically PIC18F6XJXX/8XJXX microcontrollers families, entering into ICSP modes is a bit different.〔http://ww1.microchip.com/downloads/en/DeviceDoc/39644l.pdf〕 Entering ICSP Program/Verify mode requires the following three steps: # Voltage is briefly applied to the MCLR (master clear) pin. # A 32-bit key sequence is presented on PGD. # Voltage is reapplied to MCLR. A separate piece of hardware, called a programmer is required to connect to an I/O port of a PC on one side and to the PIC on the other side. A list of the features for each major programming type are: # Parallel port - large bulky cable, most computers have only one port and it may be inconvenient to swap the programming cable with an attached printer. Most laptops newer than 2010 do not support this port. Parallel port programming is very fast. # Serial port (COM port) - At one time the most popular method. Serial ports usually lack adequate circuit programming supply voltage. Most computers and laptops newer than 2010 lack support for this port. # Socket (in or out of circuit) - the CPU must be either removed from circuit board, or a clamp must be attached to the chip making access an issue. # USB cable - Small and light weight, has support for voltage source and most computers have extra ports available. The distance between the circuit to be programmed and the computer is limited by the length of USB cable - it must usually be less than 180 cm. This can make programming devices deep in machinery or cabinets a problem. ICSP programmers have many advantages, with size, computer port availability, and power source being major features. Due to variations in the interconnect scheme and the target circuit surrounding a micro-controller, there is no programmer that works with '' all '' possible target circuits or interconnects. (Microchip ) provides a detailed ICSP programming guide〔(ww1.microchip.com/downloads/en/devicedoc/30277d.pdf ICSP programming guide ), Microchip〕 Many sites provide programming and circuit examples. PICs are programmed using five signals (a sixth pin 'aux' is provided but not used). The data is transferred using a two wire synchronous serial scheme, three more wires provide programming and chip power. The clock signal is always controlled by the programmer. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「In-system programming」の詳細全文を読む スポンサード リンク
|